# cmake_minimum_required(VERSION 3.15)
# project(mysqlite VERSION 0.1)
# include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
# # GLOB所有的.c文件
# file(GLOB SRC_FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/*.c)
# # 创建一个新的列表来存储除了main.c之外的所有文件
# file(GLOB TEST_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/test/*.c)
# set(TEST_SRC_DIR)
# foreach(file ${SRC_FILES})
#     # 检查文件名是否不是main.c
#     if(NOT "${file}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}/src/main.c")
#         list(APPEND TEST_SRC_DIR ${file})
#     endif()
# endforeach()
# add_executable(sqlite.exe ${SRC_FILES})

# add_executable(test.exe ${TEST_SRC_DIR})
# set (CMAKE_CXX_FLAGS “${CMAKE_CXX_FLAGS} -g”)
# # set(CMAKE_C_COMPILER ...)
# # 设置可执行文件的输出路径
# set_target_properties(sqlite.exe test.exe PROPERTIES
#     RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/bin"
# )

cmake_minimum_required(VERSION 3.15)
project(mysqlite VERSION 0.1)

# 包含头文件目录
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)

# GLOB所有的.c文件
file(GLOB ALL_SRC_FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/*.c)
# 创建一个新的列表来存储除了main.c之外的所有文件
# set(SRC_FILES)
# foreach(file ${ALL_SRC_FILES})
#     # 检查文件名是否不是main.c
#     if(NOT "${file}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}/src/main.c")
#         list(APPEND SRC_FILES ${file})
#     endif()
# endforeach()
# # 现在SRC_FILES只包含除了main.c之外的所有文件

# GLOB测试源文件（如果需要）
# file(GLOB TEST_SRC_FILES ${CMAKE_CURRENT_SOURCE_DIR}/test/*.c)
# message(${TEST_SRC_FILES})
# 添加可执行文件
add_executable(sqlite.exe ${ALL_SRC_FILES})
# add_executable(test.exe ${TEST_SRC_FILES} ${SRC_FILES})

# 设置编译标志和其他属性...
# set_target_properties(sqlite.exe test.exe PROPERTIES
#     RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/bin"
# )
set_target_properties(sqlite.exe PROPERTIES
    RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/bin"
)